<html>

    <head>


        <script language="javascript" type="application/javascript" src="js/jquery.min.js"></script>  

        <script language="javascript" type="application/javascript" src="js/jquery.jqplot.min.js"></script>


        <!-- jqPlot renderers and plugins -->
        <script class="include" language="javascript" type="application/javascript" src="js/jqplot.canvasTextRenderer.min.js"></script>
        <script class="include" language="javascript" type="application/javascript" src="js/jqplot.canvasAxisLabelRenderer.min.js"></script>
        <!-- end jqPlot renderers and plugins -->


    </head>


    <body>
        <div id="chart1" style="height:300px; width:500px;"></div>
        <button onclick="t()"> click1 </button>
    </body>
</html>

<script  language="javascript" type="text/javascript">
    
    function t(){
        $("#chart1").html("");
        var plot1 = $.jqplot ('chart1', [[3,7,9,1,4,6,8,2,5]]);
    }

    $(document).ready(function(){
        var cosPoints = []; 
        for (var i=0; i<2*Math.PI; i+=0.1){ 
            cosPoints.push([i, Math.cos(i)]); 
        } 
        var plot1 = $.jqplot('chart1', [cosPoints], {  
            series:[{showMarker:false}],
            axes:{
                xaxis:{
                    label:'Angle (radians)'
                },
                yaxis:{
                    label:'Cosine'
                }
            }
        });
    }); 
</script>